package com.itheima.domain;

import java.util.Objects;

public class GirlFriend {
    private String name;
    private double age;
    private double height;


    public GirlFriend() {
    }

    public GirlFriend(String name, double age, double height) {
        this.name = name;
        this.age = age;
        this.height = height;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getAge() {
        return age;
    }

    public void setAge(double age) {
        this.age = age;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    @Override
    public String toString() {
        return "GirlFriend{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", height=" + height +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        GirlFriend that = (GirlFriend) o;
        return Double.compare(age, that.age) == 0 && Double.compare(height, that.height) == 0 && Objects.equals(name, that.name);
    }

}
